Optimal. Leaf size=171 \[ \frac{d n \cos (e+f x) (d \csc (e+f x))^{n-1} \, _2F_1\left (\frac{1}{2},\frac{1-n}{2};\frac{3-n}{2};\sin ^2(e+f x)\right )}{a f (1-n) \sqrt{\cos ^2(e+f x)}}+\frac{\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac{1}{2},-\frac{n}{2};\frac{2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt{\cos ^2(e+f x)}}-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.237542, antiderivative size = 171, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3238, 3820, 3787, 3772, 2643} \[ \frac{d n \cos (e+f x) (d \csc (e+f x))^{n-1} \, _2F_1\left (\frac{1}{2},\frac{1-n}{2};\frac{3-n}{2};\sin ^2(e+f x)\right )}{a f (1-n) \sqrt{\cos ^2(e+f x)}}+\frac{\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac{1}{2},-\frac{n}{2};\frac{2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt{\cos ^2(e+f x)}}-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3238
Rule 3820
Rule 3787
Rule 3772
Rule 2643
Rubi steps
\begin{align*} \int \frac{(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx &=\frac{\int \frac{(d \csc (e+f x))^{1+n}}{a+a \csc (e+f x)} \, dx}{d}\\ &=-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac{n \int (d \csc (e+f x))^n (a-a \csc (e+f x)) \, dx}{a^2}\\ &=-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac{n \int (d \csc (e+f x))^n \, dx}{a}-\frac{n \int (d \csc (e+f x))^{1+n} \, dx}{a d}\\ &=-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac{\left (n (d \csc (e+f x))^n \left (\frac{\sin (e+f x)}{d}\right )^n\right ) \int \left (\frac{\sin (e+f x)}{d}\right )^{-n} \, dx}{a}-\frac{\left (n (d \csc (e+f x))^n \left (\frac{\sin (e+f x)}{d}\right )^n\right ) \int \left (\frac{\sin (e+f x)}{d}\right )^{-1-n} \, dx}{a d}\\ &=-\frac{\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac{\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac{1}{2},-\frac{n}{2};\frac{2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt{\cos ^2(e+f x)}}+\frac{n \cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac{1}{2},\frac{1-n}{2};\frac{3-n}{2};\sin ^2(e+f x)\right ) \sin (e+f x)}{a f (1-n) \sqrt{\cos ^2(e+f x)}}\\ \end{align*}
Mathematica [F] time = 2.80116, size = 0, normalized size = 0. \[ \int \frac{(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.483, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d\csc \left ( fx+e \right ) \right ) ^{n}}{a+a\sin \left ( fx+e \right ) }}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\left (d \csc{\left (e + f x \right )}\right )^{n}}{\sin{\left (e + f x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]